/**
 * 
 */
package se.thoka.twt.client.widgets;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.Label;

/**
 * @author Thobias Karlsson, Thoka
 * @since 8 jan 2010
 */
public class SpanLabel extends Label {
	/**
	 * Creates a new instance of {@link SpanLabel}.
	 */
	public SpanLabel() {
		super(DOM.createSpan());
		
		addStyleName("gwt-Label");
	}

	/**
	 * Creates a new instance of {@link SpanLabel}.
	 * 
	 * @param text The initial text
	 */
	public SpanLabel(String text) {
		this();

		setText(text);
	}

	/**
	 * Creates a new instance of {@link SpanLabel}.
	 * 
	 * @param text The initial text
	 * @param wordWrap Set <code>false</code> to disable word wrapping
	 */
	public SpanLabel(String text, boolean wordWrap) {
		this(text);

		setWordWrap(wordWrap);
	}
}
